Dynomotion

Group: DynoMotion Message: 9171 From: todmorg Date: 2/10/2014
Subject: Trajectory planner questions
I am having problems with slamming deceleration/acceleration between g1's g2's and g3's.  I am using KmotionCNC version 4.31e.  This version does not have the "Arcs to Segments" check box


I have set the Acceleration values in the tool setup screen AND the init.c file to extremely low values to try to eliminate the slamming between segments,  but it will not go away unless I set the Collinear tolerance to a large value, like .2, then it runs smooth on most of the segments, but still slams on some of the segments and breaks the arcs into coarse line segments ( A .8" circle will have about 12 flat sides instead of being a smoth arc ). 

It feels like the Acceleration/Deceleration curves are being skipped and the machine is slamming to start and stop instantly between moves.  I have attached a random clip from a file that seems worse than some others

Kflop/Kanalog  AMC 30 amp DC servo drives, 127,000 steps per inch X,Y&Z. 

Thanks, Todd

N195   
N200   G00   X-2.6291 Y-1.8023 
N205   G00  Z0.1 
N210   G01   Z-0.51  F35.0
N215   G01   X-2.6008 Y-1.5288  F70.0
N220   G02   X-2.75 Y-0.9709 I1.6662 J0.7446
N225   G01   X-2.9111 Y-0.7481  
N230   G01   X-2.4678 Y-1.8246  
N235   G01   X-2.4523 Y-1.55  
N240   G02   X-2.6346 Y-0.7842 I1.5177 J0.7658
N245   G02   X-2.4974 Y-0.1151 I1.7 J0.
N250   G02   X-2.5 Y0. I2.4974 J0.1151
N255   G02   X-1.9615 Y1.55 I2.5 J0.
N260   G01   X-1.9217 Y1.8221  
N265   G01   X-1.7482 Y1.8202  
N270   G01   X-1.7995 Y1.55  
N275   G03   X-2.375 Y0. I1.7995 J-1.55
N280   G03   X-2.371 Y-0.1381 I2.375 J0.
N285   G03   X-2.5096 Y-0.7842 I1.4364 J-0.6461
N290   G03   X-2.3109 Y-1.55 I1.575 J0.

Group: DynoMotion Message: 9174 From: Tom Kerekes Date: 2/10/2014
Subject: Re: Trajectory planner questions
Hi Todd,

I tried running that with V4.31e and I don't see anything obviously wrong.  I set the Acceleration to 1 in/s2 and the velocity is ramped very gradually between Arcs.

I've attached a plot and the TP settings I used.

What TP settings did you use?  Maybe you could mark on the plot where you observe the problem.

Regards
TK


Group: DynoMotion Message: 9177 From: todmorg Date: 2/10/2014
Subject: Re: Trajectory planner questions

Tom, 


Thanks for the quick reply.  I copied all of your settings and it does flow through without slamming, but it is extremely slow.  I changed  the "Vel in/sec" back to 2  and the "Accel in/sec" back to 30.


It looks like the slamming is happening when advancing to shorter or longer segments, even when the set feedrate is at 70, the actual feedrate seems to slam into a lower or higher feedrate, depending on the length of the upcoming segment.  It displays feedrates as low as 4.2, a lot of 19.6's some 36's, 70 on the longer curves, all while the feedrate is set at 70. 


The feedrate does not seem to be ramping down at the end of a segment to ease through corners, it is slamming to a lower or higher feedrate at the beggining of the segment.  The slamming is so violent that it is tripping my servos on following error.


Todd

Group: DynoMotion Message: 9185 From: Tom Kerekes Date: 2/10/2014
Subject: Re: Trajectory planner questions
Hi Todd,

I'm not sure if this is normal or a bug.  With an acceleration of 30 in/sec2 it only should take 38 milliseconds to accelerate to 70ipm.  Do you realize this?  What type of system is this?  Does that make a "slam" sound on your system?  You might use the KMotion.exe Step response Screen and make similar moves and see what it sounds like and if you have encoder feedback you can plot how it actually moves.  If you have 127000 counts/inch the Velocity on the Step Response Screen for 70 ipm would be:

127000 x 70/60 = 148000 counts/sec

Acceleration of 30 in/s2 would be

30 x 127000 = 3810000

Set Jerk to infinity :  4e8

The distance to accelerate to 70ipm at 30in/s2 is only 23mils.   Slowing and stopping to go around corners and curves will show a slower feedrate. 

We could capture and plot the trajectory to see if the Trajectory planner is working correctly.  You can use the CaptureXYZMotionToFile.c example.

Regards
TK

Group: DynoMotion Message: 9191 From: todmorg Date: 2/12/2014
Subject: Re: Trajectory planner questions
Tom,
  I did a fresh install using 4.31s and switched on the "Arcs to segments" and now I can tune it in, and it runs great, even with the accel set at 30.  

For some reason the old version was shifting abruptly to a lower % of the set speed for the entire length of the segment ( as low as 4.2 even though it was set at 70), instead of doing the doing the short ramp down at the ends of the segments and accelerating back to full speed.

Todd

Group: DynoMotion Message: 9194 From: Tom Kerekes Date: 2/12/2014
Subject: Re: Trajectory planner questions
Hi Todd,

That is strange.  Could you test for us if you uncheck "Arcs to segments" if you still get the bad behavior with V4.31s?

The only difference with "Arcs to segments" turned on should be slightly more optimal acceleration/velocity through the arcs.

Thanks
TK


Group: DynoMotion Message: 9212 From: todmorg Date: 2/18/2014
Subject: Re: Trajectory planner questions
Tom,
  The problems come back when I uncheck the " Arc to Segments" button

Todd